package com.yanqu.road.entity.activity.festivalgift;

import com.yanqu.road.entity.DataObject;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class FestivalGiftData extends DataObject{

    /**
     * 活动ID
     */
    private int activityId;
    /**
     * 玩家ID
     */
    private Long userId;
    /**
     * 礼包ID
     */
    private int mallId;
    /**
     * 自选的道具
     */
    private String prop;
    /**
     * 购买次数
     */
    private int buyNum;

    /**
     * 自选道具下标数组
     * @param activityId
     */
    private List<Integer> propIndexList = new ArrayList<>();

    public void setActivityId(int activityId) {
        if(activityId != this.activityId){
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public int getActivityId() {
        return activityId;
    }

    public void setUserId(Long userId) {
        if(!Objects.equals(userId, this.userId)){
            this.userId = userId;
            setUpdateOption();
        }
    }

    public Long getUserId() {
        return userId;
    }

    public void setMallId(int mallId) {
        if(mallId != this.mallId){
            this.mallId = mallId;
            setUpdateOption();
        }
    }

    public int getMallId() {
        return mallId;
    }

    public void setProp(String prop) {
        if(!Objects.equals(prop, this.prop)){
            this.prop = prop;
            setUpdateOption();
        }
    }

    public String getProp() {
        return prop;
    }

    public int getBuyNum() {
        return buyNum;
    }

    public void setBuyNum(int buyNum) {
        if(buyNum != this.buyNum){
            this.buyNum = buyNum;
            setUpdateOption();
        }
    }

    public List<Integer> getPropIndexList() {
        return propIndexList;
    }

    public void setPropIndexList(List<Integer> propIndexList) {
        if (propIndexList != null) {
            this.propIndexList = propIndexList;
            setUpdateOption();
        }
    }
}
